<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <title>志愿一点通</title>
    <link href="${ctxStatic}/bootstrap/3.3.2/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
    <link rel="stylesheet" href="${ctxStatic}/app/css/master.css">
</head>
<body>
<nav class="topbar bluebg">
    <a class="icon-arrow icon-return" href="${wechat}/search"></a>
    <h1>批次查询</h1>
    <a class="citybtn" id="setCity" href="#">${provinceName}</a>
</nav>
<div class="wrap">
    <section class="batchbox">
        <h2 class="typetit">理科</h2>
        <div class="batchlist">
            <dl>
                <dt>
                    <span></span>
                    <span>第一批</span>
                    <span>第二批</span>
                    <span>第三批</span>
                </dt>
                <c:choose>
                    <c:when test="${not empty liBatchList}">
                        <c:forEach items="${liBatchList}" var="item">
                            <dd>
                                <span>${item.year}</span>
                                <span><fmt:formatNumber type="number" value="${item.firstScore}"/> </span>
                                <span><fmt:formatNumber type="number" value="${item.secondScore}"/></span>
                        <span>
                            <c:choose>
                                <c:when test="${not empty item.thirdScore}"><fmt:formatNumber type="number" value="${item.thirdScore}"/></c:when>
                                <c:otherwise><fmt:formatNumber type="number" value="${item.thirdAScore}"/> | <fmt:formatNumber type="number" value="${item.thirdBScore}"/></c:otherwise>
                            </c:choose>
                        </span>
                            </dd>
                        </c:forEach>
                    </c:when>
                    <c:otherwise>暂无数据</c:otherwise>
                </c:choose>
            </dl>
        </div>
    </section>
    <section class="batchbox">
        <h2 class="typetit">文科</h2>
        <div class="batchlist">
            <dl>
                <dt><span></span><span>第一批</span><span>第二批</span><span>第三批</span></dt>
                <c:choose>
                    <c:when test="${not empty wenBatchList}">
                        <c:forEach items="${wenBatchList}" var="item">
                            <dd>
                                <span>${item.year}</span>
                                <span><fmt:formatNumber type="number" value="${item.firstScore}"/> </span>
                                <span><fmt:formatNumber type="number" value="${item.secondScore}"/></span>
                        <span>
                            <c:choose>
                                <c:when test="${not empty item.thirdScore}"><fmt:formatNumber type="number" value="${item.thirdScore}"/></c:when>
                                <c:otherwise><fmt:formatNumber type="number" value="${item.thirdAScore}"/> | <fmt:formatNumber type="number" value="${item.thirdBScore}"/></c:otherwise>
                            </c:choose>
                        </span>
                            </dd>
                        </c:forEach>
                    </c:when>
                    <c:otherwise>暂无数据</c:otherwise>
                </c:choose>
            </dl>
        </div>
    </section>
</div>

<div class="shade" id="shade"></div>
<div class="classbox" id="typebox">
    <div class="typelist" id="provinceBox">
        <ul data-checks="radio">
            <li <c:if test="${empty province}">class="cur"</c:if> rel="">不限</li>
            <c:forEach items="${fns:getProvinceList()}" var="area">
                <li rel="${area.code}" <c:if test="${area.code eq province}">class="cur"</c:if>>${area.name}</li>
            </c:forEach>
        </ul>
    </div>
</div>
<script src="${ctxStatic}/jquery/jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="${ctxStatic}/bootstrap/3.3.2/js/bootstrap.min.js" type="text/javascript"></script>
<script src="${ctxStatic}/app/js/main.js" type="text/javascript"></script>
<script>
    $(document).ready(function(){
        $("#provinceBox").find("li").click(function(){
            var _this = this;
            var province = $(_this).attr("rel");
            var url = "${wechat}/batchList?province="+province;
            window.location.href = url;
        });
    });
</script>
</body>
</html>